<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%String contextRoot = request.getContextPath();%>
<f:loadBundle basename="properties.messages" var="msg" />
<f:view>
<!doctype html>
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <title>SISDEP : Sistema de Informaci<h:outputText value="#{msg.tilde_o}" />n de Espacio P<h:outputText value="#{msg.tilde_u}" />blico</title>
	<meta name="description" content="" />
	<meta name="author" content="" />		     
	<link rel="stylesheet" href="<%=contextRoot%>/css/validationEngine.jquery.css" type="text/css">
	<link rel="stylesheet" href="<%=contextRoot%>/css/template.css" type="text/css">
	<link rel="stylesheet" href="<%=contextRoot%>/css/normalize.css">
	<link rel="stylesheet" href="<%=contextRoot%>/css/uniform.css"> <!-- estilos formularios -->
	<link rel="stylesheet" href="<%=contextRoot%>/css/cuerpo.css">	
	<link rel="stylesheet" href="<%=contextRoot%>/css/richCustom.css">	
</head>
<body>
<div id="marco"> <!--inicio contenedor --> 
<div class="arriba-cuerpo"></div> 
<div class="cuerpo">
<a href="<%=contextRoot%>/index.jsf"><img src="<%= contextRoot %>/images/logos.png" /></a>
<div class="clear"></div>
<!-- Menu y Usuario init() -->
	<%@ include file="include/menuUsuario.jsp" %>
<!-- Menu y Usuario end() -->
<div class="clear"></div>
<!-- Formulario --> 
<div id="buscador">
<h2>Gesti<h:outputText value="#{msg.tilde_o}" />n de OrganizacionTurnos: <h:outputText value="#{empty organizacionTurnosController.organizacionTurnos.id ? 'NUEVO' : 'EDICION'}" /></h2>

<h:form id="manageOrganizacionTurnosForm">
				<div class="clear"></div>    
						<span class="left">
						<label>Fecha de Turno <span class="asterisco">*</span></label>
							<h:inputText id="fechaTurno" styleClass="validate[required,custom[date]] fechaTurno" size="10" maxlength="10"
									value="#{organizacionTurnosController.organizacionTurnos.fecha}">
								<f:convertDateTime pattern="dd/MM/yyyy"/>
							</h:inputText>
						</span>													
						<span class="left"  style="margin-left:45px" >
						<label>Turno  <span class="asterisco">*</span> </label>							
						<h:selectOneMenu id="turno" styleClass="validate[required]" value="#{organizacionTurnosController.organizacionTurnos.turno}">
                  			<f:selectItem itemLabel="Seleccione..." itemValue=""/>    
                  			<f:selectItem itemLabel="Turno 1" itemValue="Turno 1"/>    
                  			<f:selectItem itemLabel="Turno 2" itemValue="Turno 2"/>    
                  			<f:selectItem itemLabel="Turno 3" itemValue="Turno 3"/>    
                  			<f:selectItem itemLabel="Turno 4" itemValue="Turno 4"/>                                    			
              			</h:selectOneMenu>										
						</span>
						<span class="left" style="margin-left:45px">
						<label>Cuadrante <span class="asterisco">*</span></label>
							<h:selectOneMenu id="cuadrante" styleClass="validate[required]" value="#{organizacionTurnosController.organizacionTurnos.cuadrante}">
                  			<f:selectItem itemLabel="Seleccione..." itemValue=""/>                  
                  			<f:selectItems value="#{masterListCache.squareList}"/>
              			</h:selectOneMenu>
					</span>
				<div class="clear"></div>    
						<span class="left">
						<label>Hora Inicio <span class="asterisco">*</span></label>				
							<h:selectOneMenu id="horaInicio" styleClass="validate[required]"
								value="#{organizacionTurnosController.organizacionTurnos.horaInicio}">
                                <f:selectItem itemLabel="Seleccione..." itemValue=""/>
                                <f:selectItem itemLabel="00:00" itemValue="00:00"/>
                                <f:selectItem itemLabel="01:00" itemValue="01:00"/>
                                <f:selectItem itemLabel="02:00" itemValue="02:00"/>
                                <f:selectItem itemLabel="03:00" itemValue="03:00"/>
                                <f:selectItem itemLabel="04:00" itemValue="04:00"/>
                                <f:selectItem itemLabel="05:00" itemValue="05:00"/>
                                <f:selectItem itemLabel="06:00" itemValue="06:00"/>
                                <f:selectItem itemLabel="07:00" itemValue="07:00"/>
                                <f:selectItem itemLabel="08:00" itemValue="08:00"/>
                                <f:selectItem itemLabel="09:00" itemValue="09:00"/>
                                <f:selectItem itemLabel="10:00" itemValue="10:00"/>
                                <f:selectItem itemLabel="11:00" itemValue="11:00"/>
                                <f:selectItem itemLabel="12:00" itemValue="12:00"/>
                                <f:selectItem itemLabel="13:00" itemValue="13:00"/>
                                <f:selectItem itemLabel="14:00" itemValue="14:00"/>
                                <f:selectItem itemLabel="15:00" itemValue="15:00"/>
                                <f:selectItem itemLabel="16:00" itemValue="16:00"/>
                                <f:selectItem itemLabel="17:00" itemValue="17:00"/>
                                <f:selectItem itemLabel="18:00" itemValue="18:00"/>
                                <f:selectItem itemLabel="19:00" itemValue="19:00"/>
                                <f:selectItem itemLabel="20:00" itemValue="20:00"/>
                                <f:selectItem itemLabel="21:00" itemValue="21:00"/>
                                <f:selectItem itemLabel="22:00" itemValue="22:00"/>
                                <f:selectItem itemLabel="23:00" itemValue="23:00"/>
               				</h:selectOneMenu> 											
						</span>								
						<span class="left" style="margin-left:45px">
						<label>Hora Termina <span class="asterisco">*</span></label>					
							<h:selectOneMenu id="horaTermina" styleClass="validate[required]"
								value="#{organizacionTurnosController.organizacionTurnos.horaTermina}">
                                <f:selectItem itemLabel="Seleccione..." itemValue=""/>
                                <f:selectItem itemLabel="00:00" itemValue="00:00"/>
                                <f:selectItem itemLabel="01:00" itemValue="01:00"/>
                                <f:selectItem itemLabel="02:00" itemValue="02:00"/>
                                <f:selectItem itemLabel="03:00" itemValue="03:00"/>
                                <f:selectItem itemLabel="04:00" itemValue="04:00"/>
                                <f:selectItem itemLabel="05:00" itemValue="05:00"/>
                                <f:selectItem itemLabel="06:00" itemValue="06:00"/>
                                <f:selectItem itemLabel="07:00" itemValue="07:00"/>
                                <f:selectItem itemLabel="08:00" itemValue="08:00"/>
                                <f:selectItem itemLabel="09:00" itemValue="09:00"/>
                                <f:selectItem itemLabel="10:00" itemValue="10:00"/>
                                <f:selectItem itemLabel="11:00" itemValue="11:00"/>
                                <f:selectItem itemLabel="12:00" itemValue="12:00"/>
                                <f:selectItem itemLabel="13:00" itemValue="13:00"/>
                                <f:selectItem itemLabel="14:00" itemValue="14:00"/>
                                <f:selectItem itemLabel="15:00" itemValue="15:00"/>
                                <f:selectItem itemLabel="16:00" itemValue="16:00"/>
                                <f:selectItem itemLabel="17:00" itemValue="17:00"/>
                                <f:selectItem itemLabel="18:00" itemValue="18:00"/>
                                <f:selectItem itemLabel="19:00" itemValue="19:00"/>
                                <f:selectItem itemLabel="20:00" itemValue="20:00"/>
                                <f:selectItem itemLabel="21:00" itemValue="21:00"/>
                                <f:selectItem itemLabel="22:00" itemValue="22:00"/>
                                <f:selectItem itemLabel="23:00" itemValue="23:00"/>
               				</h:selectOneMenu> 											
						</span>																	
						<div class="clear"></div>
						<br/>
					<fieldset>
					<legend>Gestor</legend>								
						<span class="left" >
						<label>Tipo Identificaci<h:outputText value="#{msg.tilde_o}" />n<span class="asterisco">*</span></label>							
							<h:selectOneMenu id="idTipoIdentificacionStr" styleClass="validate[required]" value="#{organizacionTurnosController.organizacionTurnos.idTipoDocumentoStr}">
								<f:selectItem itemLabel="Seleccione..." itemValue=""/>
								<f:selectItems value="#{masterListCache.classIdentificationForFilingType}"/>
				            </h:selectOneMenu>
						</span>			
						<span class="left" style="margin-left: 100px;">
						<label>Identificaci<h:outputText value="#{msg.tilde_o}" />n<span class="asterisco">*</span></label> 
							<h:inputText id="identificacion" size="20" maxlength="20"
							styleClass="validate[required]" value="#{organizacionTurnosController.organizacionTurnos.documentoPersona}" />
						</span>						
						<span class="left" style="margin-left: 10px;">
						<label> &nbsp; </label> 
							<a4j:commandButton id="checkPersonaButton"											 
							                 type="submit" 
							                 value="Verificar..." ajaxSingle="true" 
							                 ondblclick="return false;" reRender="checkPersonaPanel"
					                         action="#{organizacionTurnosController.checkRecursoHumanoRegistrada}" >
					                         <a4j:actionparam name="tipoIdentificacionParam" value="document.getElementById('manageOrganizacionTurnosForm:idTipoIdentificacionStr').value" 
					                                          assignTo="#{organizacionTurnosController.organizacionTurnos.idTipoDocumentoStr}" noEscape="true" />
					                         <a4j:actionparam name="identificacionParam" value="document.getElementById('manageOrganizacionTurnosForm:identificacion').value" 
					                                          assignTo="#{organizacionTurnosController.organizacionTurnos.documentoPersona}" noEscape="true" />
							</a4j:commandButton>
						</span>	
						<div class="clear" style="margin-left: 400px;"></div>

						<span class="left" style="margin-left:0px"><label>
						<a4j:outputPanel id="checkPersonaPanel" layout="block" >
							<h:panelGrid columns="1" style="text-align: left; width: 400px;" styleClass="tablapaginacion" >
							<h:outputText value="Recurso Humano Registrado: #{organizacionTurnosController.recursoHumano.nombreCompleto}" />
							<h:outputText value="#{msg.tilde_A}rea: #{organizacionTurnosController.recursoHumano.area}" />
	                        </h:panelGrid>
                        </a4j:outputPanel>
                        </label>
						</span>	
						</fieldset>	
						<div class="clear"></div>
						<br/>
					<fieldset>
					<legend>Encargado</legend>						
						<span class="left" >
						<label>Tipo Identificaci<h:outputText value="#{msg.tilde_o}" />n</label>							
							<h:selectOneMenu id="idTipoIdentificacionStr1" styleClass="" value="#{organizacionTurnosController.organizacionTurnos.idTipoDocumentoEncargadoStr}">
								<f:selectItem itemLabel="Seleccione..." itemValue=""/>
								<f:selectItems value="#{masterListCache.classIdentificationForFilingType}"/>
				            </h:selectOneMenu>
						</span>			
						<span class="left" style="margin-left: 100px;">
						<label>Identificaci<h:outputText value="#{msg.tilde_o}" />n</label> 
							<h:inputText id="identificacion1" size="20" maxlength="20"
							styleClass="" value="#{organizacionTurnosController.organizacionTurnos.documentoPersonaEncargado}" />
						</span>						
						<span class="left" style="margin-left: 10px;">
						<label> &nbsp; </label> 
							<a4j:commandButton id="checkPersonaEncargadaButton"											 
							                 type="submit" 
							                 value="Verificar..." ajaxSingle="true" 
							                 ondblclick="return false;" reRender="checkPersonaEncargadaPanel"
					                         action="#{organizacionTurnosController.checkRecursoHumanoEncargadoRegistrada}" >
					                         <a4j:actionparam name="tipoIdentificacionParam" value="document.getElementById('manageOrganizacionTurnosForm:idTipoIdentificacionStr1').value" 
					                                          assignTo="#{organizacionTurnosController.organizacionTurnos.idTipoDocumentoEncargadoStr}" noEscape="true" />
					                         <a4j:actionparam name="identificacionParam" value="document.getElementById('manageOrganizacionTurnosForm:identificacion1').value" 
					                                          assignTo="#{organizacionTurnosController.organizacionTurnos.documentoPersonaEncargado}" noEscape="true" />
							</a4j:commandButton>
						</span>	
						<div class="clear" style="margin-left: 400px;"></div>

						<span class="left" style="margin-left:0px"><label>
						<a4j:outputPanel id="checkPersonaEncargadaPanel" layout="block" >
							<h:panelGrid columns="1" style="text-align: left; width: 400px;" styleClass="tablapaginacion" >
							<h:outputText value="Recurso Humano Registrado: #{organizacionTurnosController.recursoHumanoEncargado.nombreCompleto}" />
							<h:outputText value="#{msg.tilde_A}rea: #{organizacionTurnosController.recursoHumanoEncargado.area}" />
	                        </h:panelGrid>
                        </a4j:outputPanel>
                        </label>
						</span>		
						</fieldset>								
				<div class="clear"></div>    
		<div class="clear"></div>
		(<span class="asterisco"> * </span>) : Campo Obligatorio
		<div class="clear"></div>
		<span class="botones right">
		<h:commandButton id="createOrganizacionTurnosButton"						 
             type="submit" 
             value="Guardar" 
             ondblclick="return false;" 
             action="#{organizacionTurnosController.manage}" >
		</h:commandButton>
		</span>
</h:form>
</div>
<!-- Fin formulario --> 
				<div class="clear"></div>
				<div class="clear" style="width: 400px; margin-left: 0px;"></div>
				<div class="clear" style="margin-left: 350px;"></div>
				<span class="botones left" style="width: 223px; height: 15px; margin-left:25px; padding-top:5px; padding-bottom:5px; padding-left:20px; padding-right:20px; background-color: #006F73; color: white;">
				Informaci<h:outputText value="#{msg.tilde_o}" />n de Auditor<h:outputText value="#{msg.tilde_i}" />a
				</span>
				<div class="clear" style="margin-left: 350px;"></div>
				<div>
				<span class="left" >
				<span class="left" style="width: 110px; height: 15px; margin-left:25px; padding-top:5px; padding-bottom:5px; padding-left:10px; padding-right:10px; background-color: #EDEDED; border-top: 1px solid #999999; border-bottom: 1px solid #999999; border-left: 1px solid #999999; border-right: 1px solid #999999; color: #666666;">Usuario Creaci<h:outputText value="#{msg.tilde_o}" />n</span>
				<span class="left" style="width: 110px; height: 15px; margin-left:0px; padding-top:5px; padding-bottom:5px; padding-left:10px; padding-right:10px; background-color: #EDEDED; border-top: 1px solid #999999; border-bottom: 1px solid #999999; border-left: 0px solid #999999; border-right: 1px solid #999999; color: #666666;">Fecha Creaci<h:outputText value="#{msg.tilde_o}" />n</span>
				<span class="left" style="width: 170px; height: 15px; margin-left:0px; padding-top:5px; padding-bottom:5px; padding-left:10px; padding-right:10px; background-color: #EDEDED; border-top: 1px solid #999999; border-bottom: 1px solid #999999; border-left: 0px solid #999999; border-right: 1px solid #999999; color: #666666;">Usuario <h:outputText value="#{msg.tilde_u}" />ltima Modificaci<h:outputText value="#{msg.tilde_o}" />n</span>
				<span class="left" style="width: 170px; height: 15px; margin-left:0px; padding-top:5px; padding-bottom:5px; padding-left:10px; padding-right:10px; background-color: #EDEDED; border-top: 1px solid #999999; border-bottom: 1px solid #999999; border-left: 0px solid #999999; border-right: 1px solid #999999; color: #666666;">Fecha <h:outputText value="#{msg.tilde_u}" />ltima Modificaci<h:outputText value="#{msg.tilde_o}" />n</span>
				</span>		
				<span class="left" >
				<span class="left" style="width: 110px; height: 15px; margin-left:25px; padding-top:5px; padding-bottom:5px; padding-left:10px; padding-right:10px; background-color: #ffffff; border-top: 0px solid #999999; border-bottom: 1px solid #999999; border-left: 1px solid #999999; border-right: 1px solid #999999; color: #666666;"><h:outputText value="#{organizacionTurnosController.organizacionTurnos.usuarioCrea}" /></span>
				<span class="left" style="width: 110px; height: 15px; margin-left:0px; padding-top:5px; padding-bottom:5px; padding-left:10px; padding-right:10px; background-color: #ffffff; border-top: 0px solid #999999; border-bottom: 1px solid #999999; border-left: 0px solid #999999; border-right: 1px solid #999999; color: #666666;"><h:outputText value="#{organizacionTurnosController.organizacionTurnos.fechaCrea}" /></span>
				<span class="left" style="width: 170px; height: 15px; margin-left:0px; padding-top:5px; padding-bottom:5px; padding-left:10px; padding-right:10px; background-color: #ffffff; border-top: 0px solid #999999; border-bottom: 1px solid #999999; border-left: 0px solid #999999; border-right: 1px solid #999999; color: #666666;"><h:outputText value="#{organizacionTurnosController.organizacionTurnos.usuarioModifica}" /></span>
				<span class="left" style="width: 170px; height: 15px; margin-left:0px; padding-top:5px; padding-bottom:5px; padding-left:10px; padding-right:10px; background-color: #ffffff; border-top: 0px solid #999999; border-bottom: 1px solid #999999; border-left: 0px solid #999999; border-right: 1px solid #999999; color: #666666;"><h:outputText value="#{organizacionTurnosController.organizacionTurnos.fechaModifica}" /></span>
				</span>
		    </div>
        <table width="80%" border="0" cellpadding="0" cellspacing="0" class="tablapaginacion">
			  <tr>
				<td align="center" valign="bottom" >
			    <h:form id="cancelManageForm">
    			<h:commandButton id="cancelManageButton"    						 
                 type="submit" 
                 value="Cancelar" 
                 ondblclick="return false;" 
                 action="#{organizacionTurnosController.cancelOrganizacionTurnos}" >
             </h:commandButton>
           </h:form>
				</td>
			  </tr>
				</table>							    				
    </div>
	<div class="abajo-cuerpo"></div> 
	</div> <!-- Fin contenedor -->
	<div class="footer"></div>	
<script src="<%=contextRoot%>/js/jquery/lib/jquery-1.7.2.min.js"></script><!-- De ser 1ro -->
<script src="<%=contextRoot%>/js/script.js" type="text/javascript"></script><!-- De ser 2do -->
<script src="<%=contextRoot%>/js/jquery/lib/jquery.uniform.min.js"></script> <!-- formularios --> 
<script src="<%=contextRoot%>/js/jquery/lib/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>
<script src="<%=contextRoot%>/js/jquery/lib/jquery.validationEngine-es.js" type="text/javascript" charset="utf-8"></script>
<script src="<%=contextRoot%>/js/jquery.maskedinput-1.3.js" type="text/javascript"></script> <!-- Quitar si no se usan fechas -->
<script src="<%=contextRoot%>/js/sisdep.js" type="text/javascript"></script> <!-- Quitar si no se usan funciones custom -->
<script type="text/javascript">
jQ(document).ready(function() {
	jQ("input, select, input:checkbox, input:radio, input:file").uniform();
	jQ("#manageOrganizacionTurnosForm").validationEngine('attach');
	jQ("#manageOrganizacionTurnosForm").bind("jqv.form.result", function(event, errorFound) {
        if(!errorFound) displayLoadingImage();
    });
  // Activar la mascara para CADA campo tipo fecha. En caso de NO tener quitar esta linea:
   jQ(".fechaTurno").mask("99/99/9999");
});
</script>
<%@ include file="include/validationStatus.jsp" %>
</body>
</html>
</f:view>
